package com.zkw.group.service;

import com.zkw.group.entity.CourseIndicatorSupport;
import com.zkw.group.entity.ProfesIndicatorOne;
import com.zkw.group.entity.ProfesIndicatorTwo;
import com.zkw.group.mapper.PublicProfesIndicatorMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class PublicProfesIndicatorService {

    @Autowired
    private PublicProfesIndicatorMapper publicProfesIndicatorMapper;

    //获取一级指标列表
    public List<ProfesIndicatorOne> getAllIndicatorOneList(String findicname, int pageStart, int pageSize){
        return publicProfesIndicatorMapper.getAllIndicatorOneList(findicname,pageStart,pageSize);
    }

    //获取一级指标条目数
    public int getIndicatorOneCounts(String findicname){
        return  publicProfesIndicatorMapper.getIndicatorOneCounts(findicname);
    }

    //获取二级指标列表
    public List<ProfesIndicatorTwo> getAllIndicatorTwoList(String sindicname, String fid, int pageStart, int pageSize){
        return publicProfesIndicatorMapper.getAllIndicatorTwoList(sindicname,fid,pageStart,pageSize);
    }

    //获取二级指标条目数
    public int getIndicatorTwoCounts(String sindicname,String fid){
        return  publicProfesIndicatorMapper.getIndicatorTwoCounts(sindicname,fid);
    }

    //通过课程对应二级指标编号分页查询课程对应能力指标支撑度信息
    public List<CourseIndicatorSupport> getAllCourseIndicatorSupportList(String sid, String cname, int pageStart, int pageSize){
        return publicProfesIndicatorMapper.getAllCourseIndicatorSupportList(sid,cname,pageStart,pageSize);
    }

    //获取该课程对应能力指标支撑度书数目
    public int getCourseIndicatorSupportCounts(String sid,String cname){
        return publicProfesIndicatorMapper.getCourseIndicatorSupportCounts(sid,cname);
    }
}
